#include<bits/stdc++.h>
using namespace std;
const int N=1e5+10;
int n;
int a[N],ans,cnt=0,f[N];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++)
        cin>>a[i];
    if(n==1){
        cout<<"1";
        return 0;
    }
    ans=n;
    sort(a+1,a+n+1);
    f[++cnt]++;
    for(int i=2;i<=n;i++){
        if(a[i]==a[i-1])f[cnt]++;
        else f[++cnt]++;
    }
    for(int i=2;i<=cnt;i++){
        if(f[i]>=f[i-1])ans-=f[i-1];
        else if(f[i]<f[i-1]){
            ans-=f[i];
            f[i]=f[i-1];
        }
    }
    cout<<ans;
    return 0;
}
